<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <title>后台管理系统|GTF-Admin</title>
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"/>
    <link rel="stylesheet" href="__PUBLIC__/admin/css/admin.css"/>
	<script src="__PUBLIC__/admin/js/jquery.js"></script>
</head>
<body>
	<div class="container">
		<form class="layui-form" action="{:url('addtype')}" id="addtype">
			<div class="layui-form-item">
				<label class="layui-form-label">标签名</label>
				<div class="layui-input-block">
					<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="请输入标签名" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">状态</label>
				<div class="layui-input-block">
					<input type="checkbox" checked="" name="status" lay-skin="switch" lay-filter="switchTest" lay-text="on|off">
				</div>
			</div>
			<input target-form="addtype"  type="button" value="立即提交" class="layui-btn ajax-post"/>
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
		</form>
	</div>
	<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/js/xwy.js?v=3"></script>
	<script>
		var layer,form,layedit,laydate;
		layui.use(['layer','form'], function(){
			layer = layui.layer;
			form = layui.form;
			//监听指定开关
			form.on('switch(switchTest)', function(data){
				layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
					offset: '6px'
				});
			});
		});
	</script>
</body>
</html>